/*
 * @Description:
 * @Version: 2.0
 * @Autor: wiz
 * @Date: 2023-10-09 11:33:44
 * @LastEditors: zss
 * @LastEditTime: 2025-05-21 20:07:40
 */
import { T_srv, Tsrv, ifs, ts, tvs, vue } from '@/services';
import { I_cmd, Tcmd } from './command';

const funConfig = () => {
  return {
    layoutID: 34,
    name: 'layout',
    type: 'layout',
    config: {
      mode: 'h',
      value: 0.1296137339055794,
      first: {
        moduleID: '4',
        name: 'TreeGrid',
        type: 'comp',
        category: 'nav',
        config: {
          name: '',
          comment: '',
          isCreated: false,
          status: '',
          dbType: 'mysql',
          tableStyle: {
            showHeader: true,
            showFooter: false,
            showToolbar: true,
            border: true,
            mode: 'nav'
          },
          tableColumns: [],
          uniqueIndexes: [],
          indexes: [],
          rules: [],
          toolbar: {
            default: true,
            expandAll: true,
            contractAll: true,
            mutiSelect: true,
            addon: []
          },
          tableDataSetting: { editable: true },
          tableDataSource: {
            main: {
              name: 'process_mgmt',
              fields: [
                {
                  field: 'process_type',
                  keyField: true,
                  childField: false,
                  isShow: true,
                  filter: ''
                }
              ],
              id: '554848072569253888'
            }
          },
          messageConfig: {
            custDefListener: { coordination: '4C58B4C26BA33D78' },
            emitActions: {
              search: [
                {
                  toID: '19E5E0FAB13119B0',
                  msg: {
                    type: 'search',
                    content: {
                      ikey: 'process_type',
                      ukey: 'process_type',
                      val: ''
                    }
                  },
                  sourceToID: 'process_mgmt'
                }
              ],
              refresh: []
            },
            eventGroup: {
              '': {
                custDefListener: { coordination: '4C58B4C26BA33D78' },
                children: [
                  {
                    process_mgmt: {
                      custDefListener: { coordination: '7A1749F7BCC4F4BE' },
                      children: [
                        {
                          process_info: {
                            custDefListener: {
                              coordination: '6ABD67A4AAF9F2AA'
                            },
                            children: [
                              {
                                process_specified_slot: {
                                  custDefListener: {
                                    coordination: 'D92DD731BF6C8E08'
                                  },
                                  children: []
                                }
                              },
                              {
                                process_para_details: {
                                  custDefListener: {
                                    coordination: '6A0A6EDE236F43EB'
                                  },
                                  children: []
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          }
        },
        cellID: '1'
      },
      second: {
        name: 'layout',
        type: 'layout',
        config: {
          mode: 'v',
          value: 0.3186234817813765,
          first: {
            moduleID: '1',
            name: 'BaseGrid',
            type: 'comp',
            category: 'baseData',
            config: {
              name: 'process_mgmt',
              mainFun: 'process_mgmt',
              comment: '',
              isCreated: false,
              status: 'main',
              tableStyle: {
                showHeader: true,
                showFooter: false,
                showPager: true,
                showToolbar: true,
                border: false,
                mode: null
              },
              editWindow: false,
              dbType: 'mysql',
              tableColumns: [
                {
                  fieldID: '408513584163717120',
                  field: 'createor',
                  type: 'bigint(20)',
                  isShow: false,
                  notNull: false,
                  defValue: '',
                  comment: '',
                  selectionID: null,
                  disabled: true,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '_sys_user',
                    toField: 'user_name',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    fields: [],
                    isFunLayout: true
                  },
                  align: 'left',
                  subQuery: '',
                  nodeData: false,
                  notDel: false
                },
                {
                  fieldID: '222301287968935950',
                  field: 'create_time',
                  type: 'datetime(3)',
                  isShow: false,
                  notNull: false,
                  defValue: '',
                  comment: '',
                  selectionID: null,
                  disabled: true,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: '',
                  align: 'left',
                  subQuery: '',
                  nodeData: false,
                  notDel: false
                },
                {
                  fieldID: '222301287968935948',
                  field: 'last_modify_user',
                  type: 'bigint(20)',
                  isShow: false,
                  notNull: false,
                  defValue: '',
                  comment: '',
                  selectionID: null,
                  disabled: true,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '_sys_user',
                    toField: 'user_name',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    fields: [],
                    isFunLayout: true
                  },
                  align: 'left',
                  subQuery: '',
                  nodeData: false,
                  notDel: false
                },
                {
                  fieldID: '222301287968935947',
                  field: 'last_modify_time',
                  type: 'datetime(3)',
                  isShow: false,
                  notNull: false,
                  defValue: '',
                  comment: '',
                  selectionID: null,
                  disabled: true,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: '',
                  nodeData: false,
                  notDel: false
                },
                {
                  fieldID: '222301287968935937',
                  field: 'title',
                  type: 'varchar(200)',
                  isShow: true,
                  notNull: false,
                  defValue: '',
                  comment: 'f_number',
                  selectionID: null,
                  disabled: false,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  nodeData: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: true,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: ''
                },
                {
                  fieldID: '222301287968935993',
                  field: 'f_name',
                  type: 'varchar(45)',
                  isShow: true,
                  notNull: false,
                  defValue: '',
                  comment: '',
                  selectionID: null,
                  disabled: false,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  nodeData: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: ''
                },
                {
                  fieldID: '406300130250063872',
                  field: 'f_status',
                  type: 'int(5)',
                  isShow: true,
                  notNull: false,
                  defValue: '',
                  comment: '',
                  selectionID: '543326905290477568',
                  disabled: false,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  nodeData: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: ''
                },
                {
                  fieldID: '549069322199257088',
                  field: '_audited_',
                  type: 'int(5)',
                  isShow: false,
                  notNull: true,
                  defValue: 0,
                  comment: '',
                  selectionID: '408533419782307840',
                  disabled: true,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  nodeData: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: ''
                },
                {
                  fieldID: '549070605010358272',
                  field: '_status_',
                  type: 'int(5)',
                  isShow: false,
                  notNull: true,
                  defValue: 0,
                  comment: '',
                  selectionID: '408536001896513536',
                  disabled: true,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  nodeData: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: ''
                },
                {
                  fieldID: '549070114536837120',
                  field: '_previous_status_',
                  type: 'int(5)',
                  isShow: false,
                  notNull: true,
                  defValue: 0,
                  comment: '',
                  selectionID: '408536001896513536',
                  disabled: true,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  nodeData: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: ''
                },
                {
                  fieldID: '549166012575010816',
                  field: 'process_type',
                  type: 'smallint',
                  isShow: true,
                  notNull: false,
                  defValue: '',
                  comment: '',
                  selectionID: '549166350522667008',
                  disabled: false,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  nodeData: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: ''
                },
                {
                  fieldID: '553469880281403392',
                  field: 'is_default',
                  type: 'bit(1)',
                  isShow: false,
                  notNull: false,
                  defValue: '',
                  comment: '',
                  selectionID: null,
                  disabled: false,
                  defaultFilter: false,
                  fixedLeft: false,
                  fixedRight: false,
                  nodeData: false,
                  footerMethod: null,
                  formatter: {
                    type: '',
                    decimal: 0,
                    thousandmark: false,
                    currency: ''
                  },
                  actions: [],
                  cascadeFilter: '',
                  auxProp: '',
                  minWidth: '',
                  appWeight: '',
                  isDes: false,
                  many2one: {
                    toTable: '',
                    toField: '',
                    isDropdown: false,
                    customSearch: '',
                    multiConnect: '',
                    isFunLayout: true,
                    fields: []
                  },
                  align: 'left',
                  subQuery: ''
                }
              ],
              uniqueIndexes: [],
              indexes: [],
              rules: [],
              selbill: [],
              queryLink: [],
              action: {
                beforeEdit: null,
                beforeInsert: null,
                afterEdit: null,
                afterInsert: null
              },
              headerGroup: [],
              charts: [],
              qbeSearch: { enable: false, isInitShow: false, position: 'top' },
              bancodeScan: { enable: false, terminator: '', position: 'top' },
              toolbar: {
                insert: true,
                default: true,
                delete: true,
                save: true,
                import: true,
                export: true,
                exportXML: true,
                globalSearch: true,
                refresh: true,
                edit: true,
                print: true,
                search: true,
                pasteColumn: false,
                audit: false,
                unaudit: false,
                requestAudit: false,
                auditStatus: false,
                antiAudit: null,
                accountPosted: false,
                cancelPost: false,
                caseclosed: false,
                anticlosing: false,
                freeze: false,
                unfreeze: false,
                void: false,
                addon: [
                  {
                    checked: true,
                    title: 'copy',
                    action: 'copy',
                    icon: 'wy-maximize',
                    children: [],
                    initDisabled: false,
                    chkEnabled: true,
                    initNotshow: false,
                    chkShow: false,
                    singleSelChk: false,
                    readCurrentStatus: false,
                    editedShow: false,
                    editedEnabled: false
                  }
                ]
              },
              tableDataSetting: { editable: true, autoload: false },
              messageConfig: {
                custDefListener: {
                  coordination: '7A1749F7BCC4F4BE',
                  search: ['19E5E0FAB13119B0', '9FDB3136']
                },
                emitActions: {
                  search: [
                    {
                      toID: '5438F55E67F8CF7F',
                      msg: {
                        type: 'search',
                        content: { ikey: 'id', ukey: 'master_bill_id', val: '' }
                      },
                      sourceToID: 'process_info'
                    }
                  ],
                  refresh: []
                },
                eventGroup: {
                  '': {
                    custDefListener: { coordination: '4C58B4C26BA33D78' },
                    children: [
                      {
                        process_mgmt: {
                          custDefListener: { coordination: '7A1749F7BCC4F4BE' },
                          children: [
                            {
                              process_info: {
                                custDefListener: {
                                  coordination: '6ABD67A4AAF9F2AA'
                                },
                                children: [
                                  {
                                    process_specified_slot: {
                                      custDefListener: {
                                        coordination: 'D92DD731BF6C8E08'
                                      },
                                      children: []
                                    }
                                  },
                                  {
                                    process_para_details: {
                                      custDefListener: {
                                        coordination: '6A0A6EDE236F43EB'
                                      },
                                      children: []
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              },
              permission: [
                {
                  type: 'NULL',
                  area: 'default',
                  data: {
                    browse: 1
                  }
                },
                {
                  type: 'customButton',
                  area: 'toolbar',
                  data: {
                    copy: 1
                  }
                },
                {
                  type: 'columns',
                  area: 'table',
                  data: {
                    createor: 1,
                    create_time: 1,
                    f_name: 1,
                    f_status: 1,
                    is_default: 1,
                    last_modify_time: 1,
                    last_modify_user: 1,
                    process_type: 1,
                    title: 1,
                    _audited_: 1,
                    // eslint-disable-next-line camelcase
                    _previous_status_: 1,
                    _status_: 1
                  }
                },
                {
                  type: 'button',
                  area: 'toolbar',
                  data: {
                    default: 1,
                    delete: 1,
                    edit: 1,
                    export: 1,
                    exportXML: 1,
                    globalSearch: 1,
                    import: 1,
                    insert: 1,
                    print: 1,
                    refresh: 1,
                    save: 1
                  }
                }
              ],
              funI18nFields: {
                process_info: [
                  'slc|_audited_|408533419782307840',
                  'slc|_previous_status_|408536001896513536',
                  'slc|_status_|408536001896513536'
                ],
                process_mgmt: [
                  'slc|f_status|543326905290477568',
                  'slc|process_type|549166350522667008',
                  'slc|_audited_|408533419782307840',
                  'slc|_previous_status_|408536001896513536',
                  'slc|_status_|408536001896513536'
                ],
                process_para_details: [
                  'slc|_audited_|408533419782307840',
                  'slc|_previous_status_|408536001896513536',
                  'slc|_status_|408536001896513536'
                ],
                process_specified_slot: [
                  'slc|_audited_|408533419782307840',
                  'slc|_previous_status_|408536001896513536',
                  'slc|_status_|408536001896513536'
                ]
              },
              funInfo: {
                deputyFunIDs: [
                  '553876961136275456',
                  '554572409685733376',
                  '554586901471621120'
                ],
                deputyFunInfo: [
                  {
                    key: '553876961136275456',
                    value: 'process_info'
                  },
                  {
                    key: '554572409685733376',
                    value: 'process_specified_slot'
                  },
                  {
                    key: '554586901471621120',
                    value: 'process_para_details'
                  }
                ],
                deputyFuns: [
                  'process_info',
                  'process_specified_slot',
                  'process_para_details'
                ],
                mainFun: 'process_mgmt',
                mainFunID: '554848072569253888'
              },
              triggerEvent: { rowDbClick: false, groupByField: [] },
              tableGraphMode: false
            },
            menu: {
              nav: 'produc_plan_mgmt',
              navID: '542599810239188992',
              group: 'produc_plan_mgmt',
              parent: ''
            },
            cellID: '2'
          },
          second: {
            layoutID: 0,
            name: 'cPflow',
            type: 'comp',
            cellID: '1',
            config: {
              name: 'cPflow',
              status: 'main',
              originComp: 'custom',
              originName: 'cPflow',
              permission: [
                { type: 'NULL', area: 'default', data: { browse: 1 } }
              ],
              audit: { hasRequestAudit: false },
              mainFun: 'cProcessMgmt'
            }
          }
        }
      }
    }
  };
};

export { I_cmd, T_srv, Tcmd, Tsrv, funConfig, ifs, ts, tvs, vue };
